Method of interrupt control and electronic system using the same

ABSTRACT

A method of interrupt control for an electronic system, the electronic system including a host and an electronic device, includes receiving digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; and sending an interrupt signal to the host when the value of the digital data changes from a first region among the plurality of regions to a second region among the plurality of regions and remains within the second region for a specific period of time.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 61/817,306, which was filed on Apr. 29, 2013 and titled “3D-Motion Gesture/Proximity Detection Module Sensor (MGPS)”, the contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of interrupt control and an electronic system using the same, and more particularly, to a method of interrupt control and an electronic system capable of assisting a host to receive data.

2. Description of the Prior Art

With advancements in technology, various electronic devices such as mobile phones, GPS navigator systems, tablets, personal digital assistants (PDA) and laptops have become indispensable in our daily life. A standard electronic system comprises a core processor such as a central processing unit (CPU), a microprocessor or a micro control unit (MCU). The core processor is utilized for managing and co-ordinating operations of every device in the electronic system. Since most devices need the processor to perform data processing, the load of the processor is heavy. If the processor performance is poor or a large number of tasks suddenly arrive, the processor may not be able to accomplish all tasks in time, resulting in a bottleneck in system performance.

The industry has taken a lot of effort to enhance the performance of electronic systems by developing more powerful processors as well as reducing their load. If powerful dual-core or quad-core processors are utilized, costs will increase without any guarantee that the performance can be respectively doubled or quadrupled. Other methods to reduce the processor load have therefore been developed, of which one is the interrupt control method. In the interrupt control method, an interrupt signal is sent to the processor only when there is a task to be executed in a device. Upon receiving the interrupt signal, the processor allocates resources to execute said tasks. In such a situation, the processor may not need to keep detecting the operations of every device; instead, the processor only allocates resources to a specific device after receiving the interrupt signal from the device. The load of the processor will thereby be significantly reduced. Current methods of sending interrupt signals, however, cannot effectively and accurately send interrupt signals when a task needs to be executed in the device.

SUMMARY OF THE INVENTION

It is therefore an objective of the present invention to provide a method of interrupt control and an electronic system using the same, which is capable of controlling an electronic device of the electronic system to effectively and accurately send interrupt signals, in order to enhance the efficiency of a processor of the electronic system.

The present invention discloses a method of interrupt control for an electronic system. The electronic system comprises a host and an electronic device. The method comprises receiving digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; and sending an interrupt signal to the host when the value of the digital data changes from a first region among the plurality of regions to a second region among the plurality of regions and remains within the second region for a specific period of time.

The present invention further discloses an electronic system. The electronic system comprises a host; an electronic device, for generating digital data; and a control unit. The control unit has a program executed by a processor for performing a method of interrupt control, wherein the method comprises receiving the digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; and sending an interrupt signal to the host when the value of the digital data changes from a first region among the plurality of regions to a second region among the plurality of regions and remains within the second region for a specific period of time.

The present invention further discloses a method of interrupt control for an electronic system. The electronic system comprises a host and an electronic device. The method comprises receiving digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; classifying the plurality of regions into a first group and a second group; sending an interrupt signal to the host when the value of the digital data is located in a first region among the plurality of regions in the first group and remains within the first region for each specific period of time; and not sending the interrupt signal to the host when the value of the digital data is located in a second region among the plurality of regions in the second group.

The present invention further discloses an electronic system. The electronic system comprises a host; an electronic device, for generating digital data; and a control unit. The control unit has a program executed by a processor for performing a method of interrupt control, wherein the method comprises receiving the digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; classifying the plurality of regions into a first group and a second group; sending an interrupt signal to the host when the value of the digital data is located in a first region among the plurality of regions in the first group and remains within the first region for each specific period of time; and not sending the interrupt signal to the host when the value of the digital data is located in a second region among the plurality of regions in the second group.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a common interrupt signal sending status.

FIG. 2 is a schematic diagram of an electronic system according to an embodiment of the present invention.

FIG. 3 is a schematic diagram of region division according to an embodiment of the present invention.

FIG. 4 is a schematic diagram of an interrupt signal sending status according to an embodiment of the present invention.

FIG. 5 is a schematic diagram of an interrupt signal sending status according to another embodiment of the present invention.

FIG. 6 is a schematic diagram of an interrupt signal sending process according to an embodiment of the present invention.

FIG. 7 is a schematic diagram of an interrupt signal sending process according to another embodiment of the present invention.

DETAILED DESCRIPTION

As mentioned above, current methods of sending interrupt signals cannot effectively and accurately send the interrupt signals when a task needs to be executed in the device. Please refer to FIG. 1, which is a schematic diagram of a common interrupt signal sending status. As shown in FIG. 1, a device may determine whether to send interrupt signals according to a value of data. When the value of the data is greater than a threshold value TH, the device may continue to send interrupt signals to inform the processor to execute the task. When the value of the data is smaller than the threshold value TH, the device may stop sending the interrupt signals, so the processor does not need to waste resources on detecting whether there are any tasks to be executed. In this interrupt signal sending policy, when the value of the data is close to the threshold value TH, noise in the system may cause the device to erroneously send interrupt signals; alternatively, an interrupt signal needs to be sent but is not sent due to this noise interference.

Please refer to FIG. 2, which is a schematic diagram of an electronic system 20 according to an embodiment of the present invention. The electronic system 20 includes a host 202, an electronic device 204, a control unit 206, a signal transmission interface 208 and an I/O interface 210. The host 202 is utilized for controlling operations of each device in the electronic system 20. In general, the host 202 maybe a core processor of the electronic system 20 such as a central processing unit (CPU), a microprocessor or a micro control unit (MCU). The electronic device 204, which is a device capable of executing specific functions, is controlled by the host 202. When the electronic device 204 is operating, digital data may be generated, and these digital data may be converted into output data to be transmitted to the host 202 for follow-up processing. The control unit 206 is utilized for receiving the digital data generated by the electronic device 204 via the I/O interface 210. The control unit 206 may convert these digital data into the output data, which are then transmitted to the host 202 via the signal transmitting interface 208. The control unit 206 further sends the interrupt signals to the host 202 via the I/O interface 210. When the host 202 receives the interrupt signals, the host 202 may interrupt ongoing tasks and allocate resources to receive the output data.

Please note that the abovementioned signal transmitting interface 208 and I/O interface 210 are utilized for performing connections and signal transmissions between each device. The implementation illustrated in FIG. 2 is only one of various embodiments. For example, the signal transmitting interface 208 and the I/O interface 210 may be realized in the electronic system 20 separately. The signal transmitting interface 208 and the I/O interface 210 may also be integrated into the control unit 206, or integrated into the host 202. The electronic system 20 may also use a transmission interface to integrate the functions of both the signal transmitting interface 208 and the I/O interface 210. In other words, the control unit 206 may be connected with other devices and signals may be transmitted via other interfaces or by other methods, which are not limited herein.

In detail, the control unit 206 may have a program 220, which is executed by a processor inside the control unit 206, in order to perform an interrupt control method. The interrupt control method of the present invention can be utilized for controlling the timing of sending the interrupt signals and preventing the interrupt signals from being sent erroneously due to noise interference, so that the host 202 can efficiently obtain the output data of the electronic device 204. This further reduces the load and enhances the efficiency of the host 202.

Please refer to FIG. 3, which is a schematic diagram of region division according to an embodiment of the present invention. As shown in FIG. 3, the control unit 206 may determine the value of the digital data and divide the possible range of the value of the digital data into N regions R_1-R_N, wherein N−1 threshold values TH_1-TH_(N−1) are required for dividing N regions R_1-R_N. Via such a dividing method, the control unit 206 may send an interrupt signal to the host 202 when the value of the digital data changes and crosses different regions. For example, the value of the digital data may be located in a region R_a; when the value of the digital data increases to exceed a threshold value TH_a and enters a region R_(a+1), the control unit 206 may send an interrupt signal. Otherwise, when the value of the digital data decreases to below the threshold value TH_(a−1) and enters a region R_(a−1), the control unit 206 may also send an interrupt signal.

Please note that the threshold value and the number of regions may be determined according to system requirements and are not limited herein. The range of each region may be equal or unequal to each other, and this should also be determined according to system requirements. In general, the main purpose of dividing the value of the digital data into a plurality of regions and sending an interrupt signal when the value crosses different regions is to notify the host 202 to receive output data when the value undergoes an evident change so that corresponding tasks have to be executed. When the value remains in the same region, the value undergoes no evident change and the host 202 does not need to waste resources on receiving the output data. The control unit 206 may set the threshold value to differentiate whether the digital data undergoes an evident change. As a result, the host 202 may efficiently obtain the output data of the electronic device 204, and thereby reduce the load of the host 202.

In some embodiments, the control unit 206 is triggered to send an interrupt signal after the value of the digital data crosses a threshold value and further remains within a region for a specific period of time, in order to prevent the control unit 206 from erroneously sending interrupt signals due to noise interference. In such embodiments, the control unit 206 does not send the interrupt signal at the time when the value of the digital data crosses the threshold value; instead, after the value of the digital data crosses the threshold value, the control unit 206 determines whether the value of the digital data remains within the same region over a subsequent period of time. For example, when the value of the digital data changes from a region R_b across a threshold value to a region R_c, the control unit 206 may start to count time and monitor the value of the digital data. If the value of the digital data remains within the region R_c over a subsequent period of time, the control unit 206 may determine that the above change of the digital data's value from the region R_b across the threshold value to the region R_c is not generated by noise interference. The control unit 206 therefore sends an interrupt signal to the host 202 in order to notify the host 202 to receive data. If the value of the digital data returns to the region R_b within a short time, the control unit 206 may determine that the above change of the digital data's value from the region R_b across the threshold value to the region R_c is generated by noise interference. The control unit 206 therefore does not send any interrupt signal to the host 202. Erroneous sending of interrupt signals due to noise interference may thereby be prevented.

Please refer to FIG. 4, which is a schematic diagram of an interrupt signal sending status according to an embodiment of the present invention. As shown in FIG. 4, at time T0, the value of the digital data D is located between the threshold values TH_x and TH_(x−1), i.e. the region R_x. When the value of the digital data D crosses the threshold value TH_x and enters the region R_(x+1) (e.g. at time T1), the control unit 206 does not send any interrupt signal. At this moment, the control unit 206 may monitor whether the value of the digital data D remains within the region R_(x+1) by starting to count the time. When the time that the value remains within the region R_(x+1) is at least a specific period P1 (e.g. at time T2), the control unit 206 determines that this change across the threshold value TH_x is not triggered by noise interference, and therefore sends an interrupt signal to the host 202, in order to notify the host 202 to receive the output data.

Please keep referring to FIG. 4. At time T3, the value of the digital data D crosses the threshold value TH_(x+1) and enters the region R_(x+2). At this moment, the control unit 206 may monitor whether the value of the digital data D remains within the region R_(x+2) by starting to count the time. The value of the digital data D returns to the region R_(x+1) within the specific period P1 (e.g. before time T4); hence the control unit 206 determines that this change across the threshold value TH_(x+1) is triggered by noise interference, and therefore does not send any interrupt signal to the host 202.

In the above embodiment, each time the value of the digital data crosses different regions, the control unit 206 may send an interrupt signal to the host 202 in order to notify the host 202 to receive the output data corresponding to the digital data, or check whether the value of the digital data remains within the destination region to determine whether to send the interrupt signal. In another embodiment, the interrupt signal sending policy may be executed by other ways. Please refer to FIG. 5, which is a schematic diagram of an interrupt signal sending status according to an embodiment of the present invention. As shown in FIG. 5, the possible range of the value of the digital data D is divided into N regions R_1-R_N, wherein these N regions R_1-R_N are further classified into groups G1 and G2. When the value of the digital data D is located in a region of the group G1 and remains within the region for each specific period of time, the control unit 206 may send an interrupt signal to the host 202. When the value of the digital data D is located in a region of the group G2, the control unit 206 may not send any interrupt signal.

As shown in FIG. 5, regions R_(y+1) and R_(y+3) are classified into the group G1, and regions R_y and R_(y+2) are classified into the group G2. The control unit 206 may be controlled to send an interrupt signal when the value of the digital data D is located in a region of the group G1 and remains within the region for each specific period of time, and not to send any interrupt signal when the value of the digital data D is located in a region of the group G2. In detail, at time T0, the value of the digital data D is located in the region R_y, and the control unit 206 may not send any interrupt signal since the region R_y is located in the group G2. At time Ta, the value of the digital data D crosses a threshold value TH_y and enters the region R_(y+1), and the control unit 206 may start to count time since the region R_(y+1) is located in the group G1. After a specific period P2 (i.e. at time Ta1), the value of the digital data D remains within the region R_(y+1), and thus the control unit 206 may send an interrupt signal. At time Tb, the value of the digital data D crosses a threshold value TH_(y+1) and enters the region R_(y+2), and the control unit 206 may not send any interrupt signal since the region R_(y+2) is located in the group G2. At time Tc, the value of the digital data D crosses a threshold value TH_(y+2) and enters the region R_(y+3), and the control unit 206 may start to count time since the region R_(y+3) is located in the group G1. After a specific period P2 (i.e. at time Tc1), the value of the digital data D remains within the region R_(y+3), and thus the control unit 206 may send an interrupt signal. Then, after another specific period P2 (i.e. at time Tc2), the value of the digital data D is still within the region R_(y+3), and thus the control unit 206 may send an interrupt signal. Please note that the control unit 206 may continuously send an interrupt signal in every specific period P2 until the value of the digital data D leaves the region R_(y+3).

In this embodiment, the division of N regions R_1-R_N is similar to the embodiment in FIG. 4, but the regions R_1-R_N may further be classified into the groups G1 and G2. When the value of the digital data D crosses a threshold value to enter a region of the group G1 or keeps located in a region of the group G1, the control unit 206 may send an interrupt signal in each specific period of time. When the value of the digital data D crosses a threshold value to enter a region of the group G2 or keeps located in a region of the group G2, the control unit 206 may not send any interrupt signal. In such a situation, the control unit 206 maybe controlled to send interrupt signals only when the host 202 needs to receive data by properly classifying the regions R_1-R_N into the groups G1 or G2. Redundant interrupt signals will not be sent by the control unit 206, so that the host 202 does not need to waste resources on receiving unnecessary data.

It is noticeable that the regions R_1-R_N mentioned above may be classified into the groups G1 and G2 by any methods, and these may be determined according to system requirements. In another embodiment, the control unit 206 may be controlled not to send any interrupt signal when the value of the digital data D enters a region located in the group G1 and to send an interrupt signal when the digital data D enters a region located in the group G2 and remains within the region, wherein the classification method may be determined according to system requirements; this is not limited herein. As mentioned above, the purpose of sending interrupt signals to the host 202 is to notify the host 202 to receive the output data of the electronic device 204. In general, the host 202 may not need to be notified when the value of the digital data D enters each region; instead, only when the value of the digital data D enters some specific regions should the host 202 be notified to receive the output data. These specific regions can therefore be classified into the group G1, and other regions are classified into the group G2. Via such a classification method, the determination of regions will be more flexible and can also be adapted to different requirements of sending interrupt signals. For example, if the frequency of sending interrupt signals needs to be reduced, more regions may be classified into the group G2 and fewer regions may be classified into the group G1. The control unit 206 sends an interrupt signal only when the value of the digital data D enters a region of the group G1 or keeps located in a region of the group G1. As a result, the system may be adaptive to various interrupt signal sending requirements without changing the method for region division.

The above method of sending interrupt signals based on region classification may also be immune to erroneous sending due to noise interference. For example, in FIG. 5, the control unit 206 may not send the interrupt signal at the time Ta or Tc; instead, it may keep monitoring whether the value of the digital data D continuously remains within the regions R_(y+1) and R_(y+3) when acknowledging that the value of the digital data D crosses the threshold values TH_y and TH_(y+2) and enters the regions R_(y+1) and R_(y+3) at the time Ta and Tc respectively. After determining that the change of the digital data's value is not generated by noise interference at the time Ta1 or Tc1, the control unit 206 then sends an interrupt signal to the host 202.

Please note that the control unit of the present invention is capable of accurately sending the interrupt signals to the host while preventing noise interference from causing the interrupt signals to be sent erroneously. Those skilled in the art can make modifications and alternations accordingly. For example, the abovementioned threshold values TH_1-TH_(N−1) may be defined as proper values according to system requirements, which allows the control unit 206 to send interrupt signals to the host 202 only when the value of the digital data D meets sending requirements. The length of the specific period P1 or P2 may also be set to a proper value, so that the control unit 206 may determine whether the change of the digital data's value is generated by noise interference or actual change of the value, in order to accurately send the interrupt signal. The electronic device 204 may be any devices in the electronic system 20 that can be controlled by the host 202, which should not be limited to particular types or those devices which have particular functions. In other words, any peripheral devices managed by the host 202 may utilize the abovementioned methods of sending interrupt signals to prevent noise interference from causing the signals to be sent erroneously. Therefore, the host 202 may not need to keep detecting operations of every device; instead, the host 202 may allocate resources to process tasks in the specific device only when receiving the interrupt signals.

For example, in an embodiment, the electronic device 204 may be a light sensor, and the digital data may be related to a sensing result of ambient lights. The host 202 may not need to keep receiving the data sensed by the light sensor; instead, after the light sensor obtains the sensing result, the sensing result is transmitted to the control unit 206. The control unit 206 then determines when to start sending the interrupt signals according to the value of the sensing result, e.g. defining an effective sensing result to be a change across a threshold value TH_z to a region R_z and remaining within the region R_z for a specific period P3. When the effective sensing result is detected, the control unit 206 may start to send the interrupt signal to the host 202, in order to notify the host 202 to receive data.

The above operations related to the method of sending interrupt signals can be summarized into an interrupt signal sending process 60, as shown in FIG. 6. The interrupt signal sending process 60, which can be compiled into the program 220 to be executed by the processor in the control unit 206, includes the following steps:

Step 600: Start.

Step 602: Receive digital data D generated by the electronic device 204.

Step 604: Determine the value of the digital data D and divide a possible range of the value of the digital data D into regions R_1-R_N.

Step 606: Send an interrupt signal to the host 202 when the value of the digital data D changes from a region R_x among the regions R_1-R_N to another region R_(x+1) among the regions R_1-R_N and remains within the region R_(x+1) for a specific period of time P1.

Step 608: End.

The operations and variations of the interrupt signal sending process 60 have been detailed above, and will not be narrated hereafter.

In another embodiment, the regions R_1-R_N may further be divided into the groups G1 and G2. Detailed operations related to the method of sending interrupt signals based on region classification can be summarized into another interrupt signal sending process 70, as shown in FIG. 7. The interrupt signal sending process 70, which can also be compiled into the program 220 to be executed by the processor in the control unit 206, includes the following steps:

Step 700: Start.

Step 702: Receive digital data D generated by the electronic device 204.

Step 704: Determine the value of the digital data D and divide a possible range of the value of the digital data D into regions R_1-R_N.

Step 706: Classify the regions R_1-R_N into groups G1 and G2.

Step 708: Send an interrupt signal to the host 202 when the value of the digital data D is located in a region R_(y+1) among the regions R_1-R_N in the group G1 and remains within the region R_(y+1) for each specific period of time P2.

Step 710: Not send the interrupt signal to the host 202 when the value of the digital data D is located in a region R_(y+2) among the regions R_1-R_N in the group G2.

Step 712: End.

The operations and variations of the interrupt signal sending process 70 have been detailed above, and will not be narrated hereafter.

In the prior art, conventional methods of sending interrupt signals cannot effectively and accurately send interrupt signals when a task needs to be executed in the device. If noise occurs, the noise may cause the device to erroneously send interrupt signals, or an interrupt signal may need to be sent but is not sent due to the noise interference. In comparison, the interrupt control method and electronic system of the present invention applies region division to send an interrupt signal when the value of the digital data undergoes evident change across different regions or keeps within specific regions. This method is able to effectively and accurately send the interrupt signals so that efficiency of the host is enhanced.

Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims. 

What is claimed is:
 1. A method of interrupt control for an electronic system, the electronic system comprising a host and an electronic device, the method comprising: receiving digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; and sending an interrupt signal to the host when the value of the digital data changes from a first region among the plurality of regions to a second region among the plurality of regions and remains within the second region for a specific period of time.
 2. The method of claim 1, wherein the interrupt signal controls the host to interrupt an ongoing task in order to allow the host to receive an output data corresponding to the digital data.
 3. The method of claim 1, wherein the electronic device is a light sensor and the digital data correspond to a sensing result of ambient lights.
 4. The method of claim 1, further comprising not sending the interrupt signal to the host when the value of the digital data changes from the first region to the second region and returns to the first region within the specific period of time.
 5. The method of claim 1, further comprising not sending the interrupt signal to the host when the value of the digital data is within the first region and does not change to another region.
 6. An electronic system, comprising: a host; an electronic device, for generating digital data; and a control unit, having a program executed by a processor for performing a method of interrupt control, the method comprising: receiving the digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; and sending an interrupt signal to the host when the value of the digital data changes from a first region among the plurality of regions to a second region among the plurality of regions and remains within the second region for a specific period of time.
 7. The electronic system of claim 6, wherein the interrupt signal controls the host to interrupt an ongoing task in order to allow the host to receive an output data corresponding to the digital data.
 8. The electronic system of claim 6, wherein the electronic device is a light sensor and the digital data correspond to a sensing result of ambient lights.
 9. The electronic system of claim 6, wherein the control unit does not send the interrupt signal to the host when the value of the digital data changes from the first region to the second region and returns to the first region within the specific period of time.
 10. The electronic system of claim 6, wherein the control unit does not send the interrupt signal to the host when the value of the digital data is within the first region and does not change to another region.
 11. A method of interrupt control for an electronic system, the electronic system comprising a host and an electronic device, the method comprising: receiving digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; classifying the plurality of regions into a first group and a second group; sending an interrupt signal to the host when the value of the digital data is located in a first region among the plurality of regions in the first group and remains within the first region for each specific period of time; and not sending the interrupt signal to the host when the value of the digital data is located in a second region among the plurality of regions in the second group.
 12. The method of claim 11, wherein the interrupt signal controls the host to interrupt an ongoing task in order to allow the host to receive an output data corresponding to the digital data.
 13. The method of claim 11, wherein the electronic device is a light sensor and the digital data correspond to a sensing result of ambient lights.
 14. The method of claim 11, further comprising not sending the interrupt signal to the host when the value of the digital data changes from the second region to the first region and returns to the second region within the specific period of time.
 15. The method of claim 11, further comprising sending the interrupt signal to the host when the value of the digital data changes from the second region to the first region and remains within the first region for the specific period of time.
 16. An electronic system, comprising: a host; an electronic device, for generating digital data; and a control unit, having a program executed by a processor for performing a method of interrupt control, the method comprising: receiving the digital data generated by the electronic device; determining a value of the digital data and dividing a possible range of the value of the digital data into a plurality of regions; classifying the plurality of regions into a first group and a second group; sending an interrupt signal to the host when the value of the digital data is located in a first region among the plurality of regions in the first group and remains within the first region for each specific period of time; and not sending the interrupt signal to the host when the value of the digital data is located in a second region among the plurality of regions in the second group.
 17. The electronic system of claim 16, wherein the interrupt signal controls the host to interrupt an ongoing task in order to allow the host to receive an output data corresponding to the digital data.
 18. The electronic system of claim 16, wherein the electronic device is a light sensor and the digital data correspond to a sensing result of ambient lights.
 19. The electronic system of claim 16, wherein the control unit does not send the interrupt signal to the host when the value of the digital data changes from the second region to the first region and returns to the second region within the specific period of time.
 20. The electronic system of claim 16, wherein the control unit sends the interrupt signal to the host when the value of the digital data changes from the second region to the first region and remains within the first region for the specific period of time. 